#ifndef VICONMODEL_H
#define VICONMODEL_H

#include "basemodel.h"
#include "viconconnection.h"

class VICONModel : public BaseModel
{
    Q_OBJECT
public:
    explicit VICONModel(QObject *parent = 0);

    QString toString();

    int *getIPAddress();

protected:
    void createConnection();
    void destroyConnection();
    VICONConnection *getConnection();

private:

    VICONConnection *_connectionObj;

    float _subjectX;
    float _subjectY;
    float _subjectZ;
    float _subjectXVelocity;
    float _subjectYVelocity;
    float _subjectZVelocity;

    int _subjectRoll;
    int _subjectPitch;
    int _subjectYaw;
    int _subjectRollRate;
    int _subjectPitchRate;
    int _subjectYawRate;

public slots:
    void processData(QString incomingData);

    QString getDataForArduino();

    void changeIPAddress(int *newIPAddress);

};

#endif // VICONMODEL_H
